package com.bilibili.autoconfig;

import com.bilibili.autoconfig.properties.*;
import com.bilibili.autoconfig.template.*;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(value = {TXSMSProperties.class, OssProperties.class,
        FaceProperties.class, HuanXinProperties.class, GreenProperties.class})
public class TanHuaAutoConfiguration {

    @Bean
    public TXSMSTemplate txsmsTemplate(TXSMSProperties txsmsProperties){

        return new TXSMSTemplate(txsmsProperties);
    }

    @Bean
    public OssTemplate ossTemplate(OssProperties ossProperties){

        return new OssTemplate(ossProperties);
    }

    @Bean
    public FaceTemplate faceTemplate(FaceProperties faceProperties){

        return new FaceTemplate(faceProperties);
    }

    @Bean
    public HuanXinTemplate huanXinTemplate(HuanXinProperties huanXinProperties){

        return new HuanXinTemplate(huanXinProperties);
    }

    @Bean
    public AliyunGreenTemplate aliyunGreenTemplate(GreenProperties properties) {
        return new AliyunGreenTemplate(properties);
    }


}
